package com.gitee.wsl.collections.iterator

/**
 * Iterator producing no values.
 */
object EmptyIterator : Iterator<Nothing> {
    override fun hasNext(): Boolean = false
    override fun next(): Nothing = throw NoSuchElementException("Empty iterator")
}

object EmptyMutableIterator : MutableIterator<Nothing> {
    override fun hasNext(): Boolean = false
    override fun next(): Nothing = throw NoSuchElementException("Empty iterator")
    override fun remove() {}
}